/*
 * This class was automatically generated with 
 * <a href="http://www.castor.org">Castor 1.0.4</a>, using an XML
 * Schema.
 * $Id$
 */

package com.jzhao.jpre.format.sequential.castor;

  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/

import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;

/**
 * Class FieldElementType.
 * 
 * @version $Revision$ $Date$
 */
public class FieldElementType implements java.io.Serializable {


      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Internal choice value storage
     */
    private java.lang.Object _choiceValue;

    /**
     * Field _ISOTLV
     */
    private com.jzhao.jpre.format.sequential.castor.ISOTLV _ISOTLV;

    /**
     * Field _records
     */
    private com.jzhao.jpre.format.sequential.castor.Records _records;

    /**
     * Field _fields
     */
    private com.jzhao.jpre.format.sequential.castor.Fields _fields;

    /**
     * Field _ISO8583
     */
    private com.jzhao.jpre.format.sequential.castor.ISO8583 _ISO8583;


      //----------------/
     //- Constructors -/
    //----------------/

    public FieldElementType() 
     {
        super();
    } //-- com.jzhao.jpre.format.sequential.castor.FieldElementType()


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Returns the value of field 'choiceValue'. The field
     * 'choiceValue' has the following description: Internal choice
     * value storage
     * 
     * @return the value of field 'ChoiceValue'.
     */
    public java.lang.Object getChoiceValue()
    {
        return this._choiceValue;
    } //-- java.lang.Object getChoiceValue() 

    /**
     * Returns the value of field 'fields'.
     * 
     * @return the value of field 'Fields'.
     */
    public com.jzhao.jpre.format.sequential.castor.Fields getFields()
    {
        return this._fields;
    } //-- com.jzhao.jpre.format.sequential.castor.Fields getFields() 

    /**
     * Returns the value of field 'ISO8583'.
     * 
     * @return the value of field 'ISO8583'.
     */
    public com.jzhao.jpre.format.sequential.castor.ISO8583 getISO8583()
    {
        return this._ISO8583;
    } //-- com.jzhao.jpre.format.sequential.castor.ISO8583 getISO8583() 

    /**
     * Returns the value of field 'ISOTLV'.
     * 
     * @return the value of field 'ISOTLV'.
     */
    public com.jzhao.jpre.format.sequential.castor.ISOTLV getISOTLV()
    {
        return this._ISOTLV;
    } //-- com.jzhao.jpre.format.sequential.castor.ISOTLV getISOTLV() 

    /**
     * Returns the value of field 'records'.
     * 
     * @return the value of field 'Records'.
     */
    public com.jzhao.jpre.format.sequential.castor.Records getRecords()
    {
        return this._records;
    } //-- com.jzhao.jpre.format.sequential.castor.Records getRecords() 

    /**
     * Method isValid
     * 
     * 
     * 
     * @return true if this object is valid according to the schema
     */
    public boolean isValid()
    {
        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    } //-- boolean isValid() 

    /**
     * 
     * 
     * @param out
     * @throws org.exolab.castor.xml.MarshalException if object is
     * null or if any SAXException is thrown during marshaling
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     */
    public void marshal(java.io.Writer out)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        
        Marshaller.marshal(this, out);
    } //-- void marshal(java.io.Writer) 

    /**
     * 
     * 
     * @param handler
     * @throws java.io.IOException if an IOException occurs during
     * marshaling
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     * @throws org.exolab.castor.xml.MarshalException if object is
     * null or if any SAXException is thrown during marshaling
     */
    public void marshal(org.xml.sax.ContentHandler handler)
        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        
        Marshaller.marshal(this, handler);
    } //-- void marshal(org.xml.sax.ContentHandler) 

    /**
     * Sets the value of field 'fields'.
     * 
     * @param fields the value of field 'fields'.
     */
    public void setFields(com.jzhao.jpre.format.sequential.castor.Fields fields)
    {
        this._fields = fields;
        this._choiceValue = fields;
    } //-- void setFields(com.jzhao.jpre.format.sequential.castor.Fields) 

    /**
     * Sets the value of field 'ISO8583'.
     * 
     * @param ISO8583 the value of field 'ISO8583'.
     */
    public void setISO8583(com.jzhao.jpre.format.sequential.castor.ISO8583 ISO8583)
    {
        this._ISO8583 = ISO8583;
        this._choiceValue = ISO8583;
    } //-- void setISO8583(com.jzhao.jpre.format.sequential.castor.ISO8583) 

    /**
     * Sets the value of field 'ISOTLV'.
     * 
     * @param ISOTLV the value of field 'ISOTLV'.
     */
    public void setISOTLV(com.jzhao.jpre.format.sequential.castor.ISOTLV ISOTLV)
    {
        this._ISOTLV = ISOTLV;
        this._choiceValue = ISOTLV;
    } //-- void setISOTLV(com.jzhao.jpre.format.sequential.castor.ISOTLV) 

    /**
     * Sets the value of field 'records'.
     * 
     * @param records the value of field 'records'.
     */
    public void setRecords(com.jzhao.jpre.format.sequential.castor.Records records)
    {
        this._records = records;
        this._choiceValue = records;
    } //-- void setRecords(com.jzhao.jpre.format.sequential.castor.Records) 

    /**
     * Method unmarshal
     * 
     * 
     * 
     * @param reader
     * @throws org.exolab.castor.xml.MarshalException if object is
     * null or if any SAXException is thrown during marshaling
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     * @return the unmarshaled
     * com.jzhao.jpre.format.sequential.castor.FieldElementType
     */
    public static com.jzhao.jpre.format.sequential.castor.FieldElementType unmarshal(java.io.Reader reader)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        return (com.jzhao.jpre.format.sequential.castor.FieldElementType) Unmarshaller.unmarshal(com.jzhao.jpre.format.sequential.castor.FieldElementType.class, reader);
    } //-- com.jzhao.jpre.format.sequential.castor.FieldElementType unmarshal(java.io.Reader) 

    /**
     * 
     * 
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     */
    public void validate()
        throws org.exolab.castor.xml.ValidationException
    {
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
        validator.validate(this);
    } //-- void validate() 

}
